<?php
/**
 * Created by PhpStorm.
 * User: Mysic
 * Date: 2020/10/30
 * Time: 2:25
 */

namespace app\factory;


use app\mocks\extend\MockRabbitmq;
use org\RabbitMQ;
use think\Env;

class MqFactory
{
    public static function instance()
    {
        if (Env::get('mock.rabbitmq')) {
            return MockRabbitmq::instance();
        }
        return new RabbitMQ();
    }
}